<?php

declare(strict_types=1);

namespace Plugin\Attractions\Commerce\Model\Commerce_address;

use Hyperf\Database\Model\SoftDeletes;
use Hyperf\DbConnection\Model\Model;

/**
 * @property int $id 主键ID
 * @property int $user_id 所属用户ID
 * @property string $name 姓名
 * @property string $phone 手机号码
 * @property string $province 省
 * @property string $city 市
 * @property string $district 区
 * @property string $address 地址
 * @property int $is_default 是否默认地址：1-否，2-是
 * @property \Carbon\Carbon $created_at 
 * @property \Carbon\Carbon $updated_at 
 * @property string $deleted_at 
 */
class CommerceAddress extends Model
{
    use SoftDeletes;
    /**
     * The table associated with the model.
     */
    protected ?string $table = 'commerce_address';

    /**
     * The attributes that are mass assignable.
     */
    protected array $fillable = ['id', 'user_id', 'name', 'phone', 'province', 'city', 'district', 'address', 'is_default', 'created_at', 'updated_at', 'deleted_at'];

    /**
     * The attributes that should be cast to native types.
     */
    protected array $casts = ['id' => 'integer', 'user_id' => 'integer', 'is_default' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime'];
}
